@page
@model Duende.IdentityServer.UI.EntityFramework.Pages.Admin.Clients.IndexModel
@{
}

<div class="clients-page">
    <div class="row">
        <h2>
            Clients
        </h2>
    </div>

    <div class="row">
        <div class="col-md-6">
            <form class="row">
                <div class="form-group">
                    <input class="form-control" placeholder="Filter" id="filter" name="filter" type="text" value="@Model.Filter" autofocus />
                </div>
                <div class="form-group">
                    <button class="btn btn-primary">Search</button>
                </div>

                <div class="col">
                    <a asp-page="/Admin/Index" class="btn btn-secondary">Cancel</a>
                    <a asp-page="/Admin/Clients/New" class="btn btn-success">New</a>
                </div>
            </form>
        </div>
    </div>

    <div class="row">
        <div class="col">
            <table class="table table-striped table-sm">
                <thead>
                    <tr>
                        <th>Client ID</th>
                        <th>Name</th>
                        <th>Flow</th>
                    </tr>
                </thead>

                <tbody>
                    @foreach(var client in Model.Clients)
                    {
                        <tr>
                            <td><a asp-page="/Admin/Clients/Edit" asp-route-id="@client.ClientId">@client.ClientId</a></td>
                            <td>@client.Name</td>
                            <td>@client.Flow</td>
                        </tr>
                    }
                </tbody>

            </table>
        </div>
    </div>
</div>
